<#include "../common/templet.html"/> <@layout>
<div class="container">
	<div class="page-header">
		 <#if user.id??>
				<h2>维管理信息</h2>
			<#else>
		 		<h2>新增管理员</h2>
		</#if> 
	</div>
	
	<div class="row row-offcanvas row-offcanvas-right ">
		<form class="form-horizontal" action="${ctx!}/admin/user/save" method="post">

			<div class="form-group">
				<label for="userName" class="col-sm-2 control-label">账号</label>
				<div class="col-sm-10">
					<input type="text" class="form-control" id="userName"
						name="userName" placeholder="userName" required
						value="${user.userName?if_exists }">
				</div>
			</div>
			<div class="form-group">
				<label for="userName" class="col-sm-2 control-label">角色</label>
				<div class="col-sm-10">
					<input type="radio" name="role" value="管理员" <#if user.role=='管理员'>checked</#if>>管理员
					<input type="radio" name="role" value="普通用户" <#if user.role=='普通用户'>checked</#if>>普通用户
				</div>
			</div>
			<div class="form-group">
				<label for="valid1" class="col-sm-2 control-label">是否有效</label>
				<div class="col-sm-10">
					<label class="radio-inline"> <input type="radio" name=valid
							id="valid1" value="0"<#if user.valid?if_exists ='0'>
						checked</#if>> 否
					</label> <label class="radio-inline"> <input type="radio"
							name="valid" id="valid2" value="1"<#if
						user.valid?if_exists ='1'> checked</#if>> 是
					</label>
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-offset-2 col-sm-10">
					<button type="submit" class="btn btn-primary">保存</button>
					<a type="button" class="btn btn-default" href="javascript :;"
						onClick="javascript :history.back(-1);">返回</a>
				</div>
			</div>
			<input type="hidden" name="id" value="${user.id?if_exists  }">
		</form>
	</div>
</div>
</@layout>
